package com.yiwyn.flowdemo.BusinessNode;

import com.yiwyn.flowdemo.flow.entity.BusinessHandler;

import java.util.HashMap;
import java.util.Map;

public class BusinessHandlerRouter {

    private final static Map<String, BusinessHandler> businessHandlerMap = new HashMap<>();


    public static BusinessHandler getBusinessHandler(String businessHandlerId) {
        return businessHandlerMap.get(businessHandlerId);
    }

    public static void addBusinessHandler(String businessHandlerId, BusinessHandler businessHandler) {
        businessHandlerMap.put(businessHandlerId, businessHandler);
    }

}
